package com.education.expenses.web.controller;

import com.education.expenses.entity.Role;
import com.education.expenses.entity.User;
import com.education.expenses.facade.UserFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/*
*
 * User: alpoloz
 * Date: 8/10/12
 * Time: 2:10 PM

*/


@Controller
@RequestMapping(value = "/test")
public class TestController {

    @Autowired
    private UserFacade userFacade;

    @RequestMapping(method = RequestMethod.GET)
    public void getTodoListPage(Model model) {
        User user = new User();
        user.setRole(Role.ADMIN_ROLE);
        user.setPassword("test12343");
        user.setEmail("test@mail.ru");
        user.setFirstname("test");
        user.setSurname("test");
        userFacade.createUser(user);
    }


}

